home *** CD-ROM | disk | FTP | other *** search
/ Enter 2004 February / EnterCD 02_2004.iso / Gry / Arcade! Classic Arcade Pack 2.0 / Arcade.EXE / $PROGRAMFILES / Arcade! Classic Arcade Pack / invader.swf / scripts / frame_9 / DoAction.as
Encoding:
Text File  |  2003-12-05  |  727 b   |  38 lines

  1. i = 5;
  2. this.onEnterFrame = function()
  3. {
  4.    i--;
  5.    makeAlien(i);
  6.    if(!i)
  7.    {
  8.       delete this.onEnterFrame;
  9.    }
  10. };
  11. ufo_mc.dir = 1;
  12. ufo_mc.onEnterFrame = function()
  13. {
  14.    if(paused || newLife)
  15.    {
  16.       return undefined;
  17.    }
  18.    if(this._visible)
  19.    {
  20.       if(this._currentframe == 1)
  21.       {
  22.          if(this._x > 550 || this._x < -50)
  23.          {
  24.             this._visible = false;
  25.             ufoSound_mc.gotoAndStop(1);
  26.          }
  27.          this._x += this.dir * 3;
  28.       }
  29.    }
  30.    else if(rnd() < 0.002 && alien_mc[1]._y > 108)
  31.    {
  32.       this.dir = int(rnd() * 2) * 2 - 1;
  33.       this._x = 250 - this.dir * 300;
  34.       this._visible = true;
  35.       ufoSound_mc.gotoAndStop(2);
  36.    }
  37. };
  38.